package com.aitou.mrylive.data.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * 主播简介，用于热门主播，推荐主播,etc。
 * @author Muyangmin
 * @since 1.0.0
 */
public class HotAnchorSummary implements Parcelable {

    /**
     * id : 535
     * nickname : ben01
     * curroomnum : 7777
     * snap : /style/images/default.gif
     * city : 长沙市
     * online : 40
     * avatar : /passport/avatar.php?uid=540&size=middle
     */

    private String id;
    private String nickname;
    @SerializedName("curroomnum")
    private String currentRoomNum;
    private String snap;
    private String city;
    @SerializedName("online")
    private int onlineCount;
    private String avatar;
    private String roomTitle;
    private String is_attention;
    private List<RoomTopic> roomTopic;

    public String getIs_attention() {
        return is_attention;
    }

    public void setIs_attention(String is_attention) {
        this.is_attention = is_attention;
    }

    public String getRoomTitle() {
        return roomTitle;
    }

    public List<RoomTopic> getTopic() {
        return roomTopic;
    }

    public void setTopic(List<RoomTopic> topic) {
        this.roomTopic = topic;
    }

    public void setRoomTitle(String roomTitle) {
        this.roomTitle = roomTitle;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getCurrentRoomNum() {
        return currentRoomNum;
    }

    public void setCurrentRoomNum(String currentRoomNum) {
        this.currentRoomNum = currentRoomNum;
    }

    public String getSnap() {
        return snap;
    }

    public void setSnap(String snap) {
        this.snap = snap;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public int getOnlineCount() {
        return onlineCount;
    }

    public void setOnlineCount(int onlineCount) {
        this.onlineCount = onlineCount;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    @Override
    public String toString() {
        return "HotAnchorSummary{" +
                "id='" + id + '\'' +
                ", nickname='" + nickname + '\'' +
                ", currentRoomNum='" + currentRoomNum + '\'' +
                ", snap='" + snap + '\'' +
                ", city='" + city + '\'' +
                ", onlineCount=" + onlineCount +
                ", avatar='" + avatar + '\'' +
                ", roomTitle='" + roomTitle + '\'' +
                ", is_attention='" + is_attention + '\'' +
                ", roomTopic=" + roomTopic +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.nickname);
        dest.writeString(this.currentRoomNum);
        dest.writeString(this.snap);
        dest.writeString(this.city);
        dest.writeInt(this.onlineCount);
        dest.writeString(this.avatar);
        dest.writeString(this.roomTitle);
        dest.writeString(this.is_attention);
    }

    public HotAnchorSummary(){

    }

    protected HotAnchorSummary(Parcel in) {
        this.id = in.readString();
        this.nickname = in.readString();
        this.currentRoomNum = in.readString();
        this.snap = in.readString();
        this.city = in.readString();
        this.onlineCount = in.readInt();
        this.avatar = in.readString();
        this.roomTitle=in.readString();
        this.is_attention=in.readString();
    }

    public static final Parcelable.Creator<HotAnchorSummary> CREATOR = new Parcelable.Creator<HotAnchorSummary>() {
        @Override
        public HotAnchorSummary createFromParcel(Parcel source) {
            return new HotAnchorSummary(source);
        }

        @Override
        public HotAnchorSummary[] newArray(int size) {
            return new HotAnchorSummary[size];
        }
    };

    public class RoomTopic implements Parcelable{
        String id;
        String title;

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(title);
            dest.writeString(id);
        }

        protected RoomTopic(Parcel in) {
            this.id = in.readString();
            this.title=in.readString();
        }

        public final Parcelable.Creator<RoomTopic> CREATOR = new Parcelable.Creator<RoomTopic>() {
            public  RoomTopic createFromParcel(Parcel in) {
                return new RoomTopic(in);
            }

            public RoomTopic[] newArray(int size) {
                return new RoomTopic[size];
            }
        };
    }
}
